package client.comm.baoding.ui

import android.content.Intent
import client.comm.commlib.utils.StoreUtil
import client.comm.baoding.R
import client.comm.baoding.api.bean.UserInfo
import client.comm.baoding.BaseMiddleActivity
import client.comm.baoding.adapter.page.PendReleaseBalanceFragmentPageAdapter
import client.comm.baoding.databinding.ActivityPendreleaseBalanceBinding
import client.comm.baoding.ui.vm.PendReleaseBalanceViewModel

/**
 * 待释放佣金
 */
class PendReleaseBalanceActivity : BaseMiddleActivity<PendReleaseBalanceViewModel, ActivityPendreleaseBalanceBinding>() {

    val user: UserInfo? by lazy {
        StoreUtil.getBean<UserInfo>(this@PendReleaseBalanceActivity)
    }
    val adapter: PendReleaseBalanceFragmentPageAdapter by lazy {
        PendReleaseBalanceFragmentPageAdapter(supportFragmentManager)
    }

    //所有，释放中，
    override fun getLayout(): Int {
        return R.layout.activity_pendrelease_balance
    }

    override fun initViewModel(): PendReleaseBalanceViewModel = createViewModel()

    override fun initView() {
        binding.event = this
        binding.vm = viewModel
        binding.viewPager.adapter = adapter
        binding.tabLayout.setupWithViewPager(binding.viewPager)
    }

    fun gqsfjl() {
        startActivity(Intent(this, GqsfjlActivity::class.java))
    }

}